home *** CD-ROM | disk | FTP | other *** search
- Subject: v15i035: Tools to create and unpack shell archives, Patch2
- Newsgroups: comp.sources.unix,comp.sources.bugs
- Summary: This is an official patch for cshar 2.0; please apply it.
- Approved: rsalz@uunet.UU.NET
-
- Submitted-by: Rich $alz <rsalz@bbn.com>
- Posting-number: Volume 15, Issue 35
- Archive-name: cshar/patch2
-
-
- Description:
- From: Bob Mitchell <kid@right.cs.washington.edu>
- +Unshar doesn't properly cd to the specified directory, leaving
- unpacked files in the directory it was started from.
-
- Fix:
- To aid in robustness, patches are not shipped "raw"; I apologize for
- the inconvenience. Save this message and unshar it; from rn, say
- "|unshar -d DIR", where DIR is your cshar source directory. Outside
- of rn, say "cd DIR; unshar <thisarticle". This will create a file
- called patch01, which you can then feed to the patch program.
-
- If you don't have the patch program, make the changes by hand, or get
- patch.
-
- If patch indicates that patchlevel is the wrong version, you may need
- to apply one or more previous patches, or the patch may already have
- been applied. See the patchlevel.h file to find out what has or has
- not been applied. In any event, don't continue with the patch.
-
- If any patches are missing, they can be obtained from your nearest
- comp.sources.unix archive.
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: patch02
- # Wrapped by rsalz@fig.bbn.com on Fri Jun 3 16:11:05 1988
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'patch02' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patch02'\"
- else
- echo shar: Extracting \"'patch02'\" \(1748 characters\)
- sed "s/^X//" >'patch02' <<'END_OF_FILE'
- Index: patchlevel.h
- Prereq: 2.1
- X*** /tmp/,RCSt1a26117 Fri Jun 3 16:09:09 1988
- X--- patchlevel.h Fri Jun 3 16:08:46 1988
- X***************
- X*** 2,7 ****
- X--- 2,10 ----
- X ** This file records official patches. RCS records the edit log.
- X **
- X ** $Log: patchlevel.h,v $
- X+ ** Revision 2.2 88/06/03 16:08:37 rsalz
- X+ ** patch02: Fix order of chdir/mkdir commands for unshar.
- X+ **
- X ** Revision 2.1 88/06/03 12:16:40 rsalz
- X ** patch01: Add config.x386 and config.sVr3; change "dirent.h" to <dirent.h>
- X ** patch01: In Makefile, use $(DIRLIB) only in actions, not dependencies;
- X***************
- X*** 16,19 ****
- X ** Revision 2.0 88/05/27 13:32:13 rsalz
- X ** First comp.sources.unix release
- X */
- X! #define PATCHLEVEL 1
- X--- 19,22 ----
- X ** Revision 2.0 88/05/27 13:32:13 rsalz
- X ** First comp.sources.unix release
- X */
- X! #define PATCHLEVEL 2
- X*** /tmp/,RCSt1a26117 Fri Jun 3 16:09:12 1988
- X--- unshar.c Fri Jun 3 16:08:48 1988
- X***************
- X*** 6,12 ****
- X #include "shar.h"
- X #ifdef RCSID
- X static char RCS[] =
- X! "$Header: unshar.c,v 2.1 88/06/03 11:39:33 rsalz Exp $";
- X #endif /* RCSID */
- X
- X
- X--- 6,12 ----
- X #include "shar.h"
- X #ifdef RCSID
- X static char RCS[] =
- X! "$Header: unshar.c,v 2.2 88/06/03 16:08:14 rsalz Exp $";
- X #endif /* RCSID */
- X
- X
- X***************
- X*** 338,344 ****
- X }
- X
- X /* Got directory; try to go there. Only make last component. */
- X! if (chdir(p) < 0 && mkdir(p, 0777) < 0 && chdir(p) < 0)
- X Quit("Cannot chdir nor mkdir desired directory");
- X }
- X else
- X--- 338,344 ----
- X }
- X
- X /* Got directory; try to go there. Only make last component. */
- X! if (chdir(p) < 0 && (mkdir(p, 0777) < 0 || chdir(p) < 0))
- X Quit("Cannot chdir nor mkdir desired directory");
- X }
- X else
- END_OF_FILE
- if test 1748 -ne `wc -c <'patch02'`; then
- echo shar: \"'patch02'\" unpacked with wrong size!
- fi
- # end of 'patch02'
- fi
- echo shar: End of shell archive.
- exit 0
-